package cn.tedu.spring.eg3;

import org.springframework.beans.factory.annotation.Value;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @Author: Miyako
 * @Date: 2024-08-03-9:47
 * @Description:
 */
public class ShopController {
    @Value("1")
    private  String start;


    ShopController(){
        System.out.println("1.实例化");
    }

    @Value("1")
    public void setStart(String start) {
        System.out.println("2.属性赋值");
        this.start = start;
    }

    @PostConstruct
    public void init(){
        System.out.println("3.初始化");
    }
    @PreDestroy
    public  void destroy(){
        System.out.println("5.销毁");
    }
}
